@line-height-computed:      20px;

@border-radius-base:        4px;

@padding-base-vertical:     6px;
@padding-base-horizontal:   12px;

//** Unit-less `line-height` for use in components like buttons.
@line-height-base:          1.428571429; // 20/14

//== Pagination
//
//##

@pagination-color:                     #999;
@pagination-bg:                        transparent;

@pagination-hover-color:               #999;
@pagination-hover-bg:                  rgba(51, 51, 51, 0.09);

@pagination-active-color:              #fff;
@pagination-active-bg:                 rgba(51, 51, 51, 0.4);

@pagination-disabled-color:            #777;
@pagination-disabled-bg:               transparent;


.border-left-radius (@border-radius) {
  border-top-left-radius: @border-radius;
  border-bottom-left-radius: @border-radius;
}

.border-right-radius (@border-radius) {
  border-top-right-radius: @border-radius;
  border-bottom-right-radius: @border-radius;
}

.pull-left {
  float: left;
}

//
// Pagination (multiple pages)
// --------------------------------------------------
.pagination {
  display: inline-block;
  padding-left: 0;
  margin: @line-height-computed 0;
  border-radius: @border-radius-base;

  > li {
    display: inline; // Remove list-style and block-level defaults
    > a,
    > span {
      position: relative;
      float: left; // Collapse white-space
      color: @pagination-color;
      padding: @padding-base-vertical @padding-base-horizontal;
      line-height: 18px;
      text-decoration: none;
      height: 28px;
      min-height: 28px;
      background-color: @pagination-bg;
      font-size: 12px;
      border-radius: 4px;
      margin: 0 1px;
      box-sizing: border-box;
    }
    &:first-child {
      > a,
      > span {
        margin-left: 0;
        .border-left-radius(@border-radius-base);
      }
    }
    &:last-child {
      > a,
      > span {
        .border-right-radius(@border-radius-base);
      }
    }
  }

  > li:not(.active) > a,
  > li:not(.active) > span {
    &:hover,
    &:focus {
      color: @pagination-hover-color;
      background-color: @pagination-hover-bg;
    }
  }

  > .active > a,
  > .active > span {
    color: @pagination-active-color;
    background-color: @pagination-active-bg;
    cursor: default;
  }

  > .disabled {
    > span,
    > a {
      color: @pagination-disabled-color;
      background-color: @pagination-disabled-bg;
      pointer-events: none; // Future-proof disabling of clicks on `<a>` elements
    }
  }

  .redirector {
    > span {
      color: #CCC !important;
      padding: 0;
      margin-left: 15px;
      line-height: 28px;
      &:hover {
        background: none !important;
      }
      > span {
        float: left;
      }
    }

    .form-control {
      box-sizing: border-box;
      width: 50px;
      height: 22px;
      margin: 3px 5px;
      text-align: center;
      display: block;
      padding: 5px 10px;
      font-size: 12px;
      line-height: 1.5;
      color: #555;
      background-color: #fff;
      background-image: none;
      border: 1px solid #ccc;
      border-radius: 2px;
      outline: 0;
    }
  }
}

.react-paginator-darken {
  .pagination {
    > li > a,
    > li > span {
      color: #fff;
    }

    > li:not(.active) > a,
    > li:not(.active) > span {
      &:hover,
      &:focus {
        color: #fff;
        background-color: rgba(51, 51, 51, 0.2);
      }
    }

    > .disabled {
      > span,
      > a {
        color: #fff;
      }
    }
  }
}
